@model ZKEACMS.FormGenerator.Models.Form
@{
    if (Model == null)
    {
        return;
    }
    Style.Reqiured("datepicker").AtFoot();
    Style.Reqiured("form-widget").AtFoot();

    Script.Reqiured("datepicker").AtFoot();
    Script.Reqiured("distpicker").AtFoot();

    Script.Reqiured("validate").AtFoot();
    Script.Reqiured("form-widget").AtFoot();
}
<div class="form-widget">
    @if (ViewContext.HttpContext.Request.Query["status"] == "error")
    {
        <div class="alert alert-danger alert-dismissible" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            @System.Net.WebUtility.UrlDecode(ViewContext.HttpContext.Request.Query["msg"])
        </div>
    }
    @if (ViewContext.HttpContext.Request.Query["status"] == "complete")
    {
        <div class="alert alert-success alert-dismissible" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            @L("表单提交成功")
        </div>
    }

    <form method="post" asp-action="Submit" asp-controller="FormData">
        <input type="hidden" name="next" value="@ViewContext.HttpContext.Request.GetAbsoluteUrl()" />
        <input type="hidden" name="FormId" value="@Model.ID" />
        <div class="row">
            @for (int i = 0; i < Model.FormFields.Count; i++)
            {
                <div class="@Model.FormFields[i].Column">
                    @await Html.PartialAsync(string.Format("EditorTemplates/Form.{0}", Model.FormFields[i].Name), Model.FormFields[i])
                </div>
            }
        </div>
        <hr />
        <button class="btn btn-default">@L("提交")</button>
    </form>
</div>